#!/bin/sh

args=
for x; do
    args="$args${args:+, }'$x'"
done

case "$matlab_MODE" in
    matlab)
        options='-nodisplay -nosplash -nodesktop -nojvm -r'
        ;;
    octave)
        options='-q --no-gui --no-history --eval'
        ;;
    *)
        echo "Bad matlab_MODE: $matlab_MODE"
        exit 1
        ;;
esac

exec $matlab_MODE $options "${STEP:-stepA_mal}($args);quit;"
